package com.hl.service;

import com.hl.mapper.ConsultantMapper;
import com.hl.pojo.Consultant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ConsultantServiceImpl implements ConsultantService {
    @Autowired
    private ConsultantMapper consultantMapper;

    @Override
    public Integer add(Consultant consultant) {
        return consultantMapper.add(consultant);
    }

    @Override
    public List<Consultant> findAll() {
        return consultantMapper.findAll();
    }

    @Override
    public Integer del(Integer id) {
        return consultantMapper.del(id);
    }

    @Override
    public Consultant findById(Integer id) {
        return consultantMapper.findById(id);
    }

    @Override
    public Integer update(Consultant consultant) {
        return consultantMapper.update(consultant);
    }
    @Override
    public List<Consultant> findByExcellenceAndLevel(Integer consultantLevelId, Integer fieldNameId) {
        return consultantMapper.findByExcellenceAndLevel(consultantLevelId,fieldNameId);
    }

    @Override
    public List<Consultant> findByName(String name) {
        return consultantMapper.findByName(name);
    }
}
